
<fieldset id="agrupacion" >
<legend>Resultado </legend>

<% if @cultural_heritage_periods.size > 0 %>
<table class="paginated_table sorted_table" >
  <thead>
  <tr>
    <th>Nombre</th>    
    <th>Fecha Inicio</th>
    <th>Fecha Fin</th>
    <th>Acciones</th>
  </tr>
</thead>
<tbody>
<% @cultural_heritage_periods.each do |cultural_heritage_period| %>
  <tr>
    <td><%= cultural_heritage_period.name %></td>
    <td>
      <%if ! cultural_heritage_period.startdate.blank?%>
        <%= cultural_heritage_period.startdate.strftime("%Y").to_s.to_i%>
        <%if cultural_heritage_period.dcInicio%>
        DC
        <%else%>
        AC
        <%end%>
      <%end%>
    </td>
    <td>
      <%if ! cultural_heritage_period.enddate.blank?%>
        <%= cultural_heritage_period.enddate.strftime("%Y").to_s.to_i%>
        <%if cultural_heritage_period.dcFin%>
        DC
        <%else%>
        AC
        <%end%>
    <%end%>
    </td>
     <td><%= link_to image_tag("navi/search-16-ns.png", :border => 0,:title=>"Mostrar"), cultural_heritage_period%>
       <% if (user_signed_in? && ([2].include?(current_user.role))) %>
    <%= link_to image_tag("navi/pencil-16-ns.png", :border => 0,:title=>"Editar"), edit_cultural_heritage_period_path(cultural_heritage_period) %>
    <%= link_to image_tag("navi/cross-16-ns.png",:title=>"Eliminar", :border => 0), cultural_heritage_period, :confirm => 'Esta Seguro?', :method => :delete %>
     <%end%>
     </td>
  </tr>
<% end %>
</tbody>
</table>

<% else %>
    <p> Ningún registro encontrado</p>
<% end %>

<fieldset/>